|
class Curve |
|
Parent: Entity |
|
|
Methods:count_edges, each_edge, edges, first_edge, last_edge, length, vertices |
|
|
Sample Code:curvetests.rb |
|
|
Instance Methods |
|
count_edges |
|
The count_edges method is used to retrieve the number of Edge objects that make up the Curve. |
|
Syntax: |
|
num_edge = curve.count_edges |
|
Arguments: |
|
|
|
Return Value: |
|
num_edges - the number of edges in the curve |
|
Comments: |
|
|
|
Example: |
|
centerpoint = Geom::Point3d.new |
|
each_edge |
|
The each_edge method is used to iterate through all of the Edge objects in the curve. |
|
Syntax: |
|
curve.each_edge {|edge| ...} |
|
Arguments: |
|
|
|
Return Value: |
|
edge - a variable that will hold each Edge object as they are found. |
|
Comments: |
|
|
|
Example: |
|
centerpoint = Geom::Point3d.new |
|
edges |
|
The edges method is used to retrieve an array of Edge objects that make up the Curve. |
|
Syntax: |
|
edges = curve.edges |
|
Arguments: |
|
|
|
Return Value: |
|
edges - an array of Edge objects if successful |
|
Comments: |
|
|
|
Example: |
|
centerpoint = Geom::Point3d.new |
|
first_edge |
|
The first_edge method is used to retrieve the first edge of the curve. |
|
Syntax: |
|
edge = curve.first_edge |
|
Arguments: |
|
|
|
Return Value: |
|
edge - the first Edge object in the curve if successful |
|
Comments: |
|
|
|
Example: |
|
centerpoint = Geom::Point3d.new |
|
last_edge |
|
The last_edge method is used to retrieve the last edge of the curve. |
|
Syntax: |
|
edge = curve.last_edge |
|
Arguments: |
|
|
|
Return Value: |
|
edge - the last Edge object in the curve if successful |
|
Comments: |
|
|
|
Example: |
|
centerpoint = Geom::Point3d.new |
|
length |
|
The length method retrieves the length of the curve. |
|
Syntax: |
|
length = curve.length |
|
Arguments: |
|
|
|
Return Value: |
|
length - the length of the curve in current units if successful |
|
Comments: |
|
|
|
Example: |
|
centerpoint = Geom::Point3d.new |
|
vertices |
|
The vertices method is used to retrieve the Vertex objects that are on the curve. |
|
Syntax: |
|
verticies = curve.verticies |
|
Arguments: |
|
|
|
Return Value: |
|
vertices - an array of Vertex objects if successful |
|
Comments: |
|
|
|
Example: |
|
centerpoint = Geom::Point3d.new |